.TH std::make_exception_ptr 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::make_exception_ptr \- std::make_exception_ptr

.SH Synopsis
   Defined in header <exception>
   template< class E >                                     \fI(since C++11)\fP
   std::exception_ptr make_exception_ptr( E e ) noexcept;

   Creates an std::exception_ptr that holds a reference to a copy of e. This is done as
   if executing the following code:

 try {
     throw e;
 } catch(...) {
     return std::current_exception();
 }

.SH Parameters

   \fI(none)\fP

.SH Return value

   An instance of std::exception_ptr holding a reference to the copy of e, or to an
   instance of std::bad_alloc or to an instance of std::bad_exception (see
   std::current_exception).

.SH Notes

   The parameter is passed by value and is subject to slicing.

.SH See also

   current_exception captures the current exception in a std::exception_ptr
   \fI(C++11)\fP           \fI(function)\fP
